<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <title>for-in循环</title>
    <script type="text/javascript">
        let Phone={
            name:"荣耀",
            type:"x60",
            price:4500,
            /* [height]: "12cm"
            使用符号添加的属性一般不想外界直接访问，所以用for-in循环读取会报错*/
        }
        for(let attribute in Phone){
            console.log(attribute,Phone[attribute])
        }
    </script>
</head>
<body>
    
</body>
</html>